package com.heima.article.service;

import com.heima.article.dto.*;
import com.heima.article.entity.ApArticle;
import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.common.dto.ResponseResult;

/**
 * <p>
 * 文章信息表，存储已发布的文章 服务类
 * </p>
 *
 * @author wsj
 * @since 2022-03-11
 */
public interface IApArticleService extends IService<ApArticle> {
    /**
     * 保存app文章
     * @param dto
     * @return
     */
    ResponseResult<Long> saveArticle(ArticleDto dto);

    ResponseResult loadArticle(ArticleHomeDto dto,Integer type);

    ResponseResult loadArticleInfo(ArticleInfoDto dto);

    ResponseResult loadArticleBehavior(ArticleBehaviorDto dto);

    ResponseResult loadArticleComments(ArticleCommentDto dto);

    ResponseResult updateCommentStatus(ArticleCommentStatusDto dto);

    ResponseResult newsDimension(String beginDate, String endDate);

    ResponseResult getNewsPageStatistics(String beginDate, String endDate, Integer page, Integer size);
}
